package com.project.biz;

import com.baomidou.mybatisplus.extension.service.IService;
import com.project.entity.CmsOrderDetail;
import com.project.pojo.dto.ProductOrderListItemDTO;

import java.util.List;

/**
 * @Description: 商品订单详情业务层接口类
 * @Author: zhuchi
 * @CreateDate: 2020/10/16 22:55
 * @Version: 1.0
 */
public interface CmsOrderDetailBiz extends IService<CmsOrderDetail> {

    /**
     * 添加订单详情
     * @param orderDetails
     * @param orderId
     * @return
     */
    int addOrderDetail(List<CmsOrderDetail> orderDetails, Long orderId);

    /**
     * 获取订单商品信息,用于订单列表
     * @param orderId
     * @return
     */
    List<ProductOrderListItemDTO> getProductOrderDetailList(Long orderId);

    /**
     * 获取商品订单详情,仅订单详情表中数据
     * @param orderId
     * @return
     */
    List<CmsOrderDetail> getProductOrderDetails(Long orderId);

}
